import Vue from 'vue'
import App from './App'
import axios from 'axios'
import store from './store'
import router from './router'
import api from './http'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import Router from 'vue-router'

//添加路由异常回调函数
const originalPush = Router.prototype.push
Router.prototype.push = function push(location) {
  return originalPush.call(this, location).catch(err => err)
}
Vue.use(api)
Vue.use(ElementUI)
//模拟数据


Vue.config.productionTip = false
Vue.prototype.axios = axios

import './assets/style/reset.css'
import './assets/iconfont/iconfont.css'
import './assets/style/app.css'
import './assets/style/home.scss'

new Vue({
  el: '#app',
  store,
  router,
  components: { App },
  template: '<App/>'
})


